'use strict';

module.exports = {
  // 登陆请求响应定义
  queryAdminRolesList: {
    request: () => {
      return {
        name: { type: 'string', required: false },
        pageSize: { type: 'number', required: true, min: 1 }, // 一页多少条
        pageIndex: { type: 'number', required: true, min: 1 }, // 第几页
      };
    },
    response: () => {
      return {
        pageCount: { type: 'int', required: true }, // 页数总和 
        dataCount: { type: 'int', required: true }, // 总数据量
        adminRolesList: [],
      };
    },
  },
  updateAdminRoles: {
    request: () => {
      return {
        id: { type: 'int', required: false },
        roleName: { type: 'string', required: false },
        state: { type: 'int', required: false },
        roleDes: { type: 'string', required: false },
      };
    },
  },
  addAdminRoles: {
    request: () => {
      return {
        roleName: { type: 'string', required: true },
        roleDes: { type: 'string', required: false },
      };
    },
  },
  DeleteAdminRoles: {
    request: () => {
      return {
        id: { type: 'int', required: false },
      };
    },
  },
  SetRoleAutho: {
    request: () => {
      return {
        roleId: { type: 'int', required: true },
        menus: { type: 'array', required: true },
      };
    },
  },
  getRoleAutho: {
    request: () => {
      return {
        roleId: { type: 'int', required: true },
      };
    },
  },
  getRoleMenuUserRights: {
    request: () => {
      return {
        roleId: { type: 'int', required: true },
      };
    },
  },
};
